import cv2
import numpy as np

img1 = cv2.imread('1.jpeg')

img2 = cv2.add(img1, 50)

x, y, z = img1.shape
offset = np.zeros((x, y, z), dtype = np.uint8)
offset[offset == 0] = 50

img3 = cv2.add(img1, offset)

cv2.imshow('img1', img1)
cv2.imshow('img2', img2)
cv2.imshow('img3', img3)

cv2.waitKey(0)
cv2.destroyAllWindows()